import request from "@/utils/request";

// 获取检验单列表
export function getInspectionList(params) {
  return request({
    url: "/api/quality/inspection/list",
    method: "get",
    params,
  });
}

// 获取检验模板列表
export function getTemplateList() {
  return request({
    url: "/api/quality/inspection/template/list",
    method: "get",
  });
}

// 获取供应商列表
export function getSupplierList(query) {
  return request({
    url: "/api/quality/inspection/supplier/list",
    method: "get",
    params: { query },
  });
}

// 创建检验单
export function createInspection(data) {
  return request({
    url: "/api/quality/inspection/create",
    method: "post",
    data,
  });
}

// 提交检验结果
export function submitInspection(data) {
  return request({
    url: "/api/quality/inspection/submit",
    method: "post",
    data,
  });
}

// 导出数据
export function exportInspection(data) {
  return request({
    url: "/api/quality/inspection/export",
    method: "post",
    data,
  });
}
